2001-05-25 Havoc Pennington <hp@redhat.com>
-
+
+ * gtk/gtkiconfactory.c: fix so that default icons are created if
+ you call gtk_stock_list_ids()
+
+ * demos/gtk-demo/stock_browser.c (create_model): sort stock items
+ in list
+
+2001-05-25 Havoc Pennington <hp@redhat.com>
+
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
2001-05-25 Havoc Pennington <hp@redhat.com>
-
+
+ * gtk/gtkiconfactory.c: fix so that default icons are created if
+ you call gtk_stock_list_ids()
+
+ * demos/gtk-demo/stock_browser.c (create_model): sort stock items
+ in list
+
+2001-05-25 Havoc Pennington <hp@redhat.com>
+
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
2001-05-25 Havoc Pennington <hp@redhat.com>
-
+
+ * gtk/gtkiconfactory.c: fix so that default icons are created if
+ you call gtk_stock_list_ids()
+
+ * demos/gtk-demo/stock_browser.c (create_model): sort stock items
+ in list
+
+2001-05-25 Havoc Pennington <hp@redhat.com>
+
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
2001-05-25 Havoc Pennington <hp@redhat.com>
-
+
+ * gtk/gtkiconfactory.c: fix so that default icons are created if
+ you call gtk_stock_list_ids()
+
+ * demos/gtk-demo/stock_browser.c (create_model): sort stock items
+ in list
+
+2001-05-25 Havoc Pennington <hp@redhat.com>
+
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
2001-05-25 Havoc Pennington <hp@redhat.com>
-
+
+ * gtk/gtkiconfactory.c: fix so that default icons are created if
+ you call gtk_stock_list_ids()
+
+ * demos/gtk-demo/stock_browser.c (create_model): sort stock items
+ in list
+
+2001-05-25 Havoc Pennington <hp@redhat.com>
+
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
2001-05-25 Havoc Pennington <hp@redhat.com>
-
+
+ * gtk/gtkiconfactory.c: fix so that default icons are created if
+ you call gtk_stock_list_ids()
+
+ * demos/gtk-demo/stock_browser.c (create_model): sort stock items
+ in list
+
+2001-05-25 Havoc Pennington <hp@redhat.com>
+
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
2001-05-25 Havoc Pennington <hp@redhat.com>
-
+
+ * gtk/gtkiconfactory.c: fix so that default icons are created if
+ you call gtk_stock_list_ids()
+
+ * demos/gtk-demo/stock_browser.c (create_model): sort stock items
+ in list
+
+2001-05-25 Havoc Pennington <hp@redhat.com>
+
* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
set can render without falling back to missing image icon
/* Stock Item/Icon Browser
*
* This source code for this demo doesn't demonstrate anything
- * particularly useful in applications, it just lets you scan the
- * available stock icons and stock items.
+ * particularly useful in applications. The purpose of the "demo" is
+ * just to provide a handy place to browse the available stock icons
+ * and stock items.
*/
+#include <string.h>
+
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
store = gtk_list_store_new_with_types (1, STOCK_ITEM_INFO_TYPE);
ids = gtk_stock_list_ids ();
+ ids = g_slist_sort (ids, (GCompareFunc) strcmp);
tmp_list = ids;
while (tmp_list != NULL)
{
g_object_unref (G_OBJECT (factory));
}
+static void
+ensure_default_icons (void)
+{
+ if (gtk_default_icons == NULL)
+ {
+ gtk_default_icons = gtk_icon_factory_new ();
+
+ get_default_icons (gtk_default_icons);
+ }
+}
+
/**
* gtk_icon_factory_lookup_default:
* @stock_id: an icon name
tmp_list = g_slist_next (tmp_list);
}
- if (gtk_default_icons == NULL)
- {
- gtk_default_icons = gtk_icon_factory_new ();
-
- get_default_icons (gtk_default_icons);
- }
+ ensure_default_icons ();
return gtk_icon_factory_lookup (gtk_default_icons, stock_id);
}
GSList *ids;
ids = NULL;
+
+ ensure_default_icons ();
tmp_list = all_icon_factories;
while (tmp_list != NULL)
/* Stock IDs (not all are stock items; some are images only) */
-#define GTK_STOCK_MISSING_IMAGE "gtk-missing-image"
-
#define GTK_STOCK_DIALOG_INFO "gtk-dialog-info"
#define GTK_STOCK_DIALOG_WARNING "gtk-dialog-warning"
#define GTK_STOCK_DIALOG_ERROR "gtk-dialog-error"
#define GTK_STOCK_JUSTIFY_FILL "gtk-justify-fill"
#define GTK_STOCK_JUSTIFY_LEFT "gtk-justify-left"
#define GTK_STOCK_JUSTIFY_RIGHT "gtk-justify-right"
+#define GTK_STOCK_MISSING_IMAGE "gtk-missing-image"
#define GTK_STOCK_NEW "gtk-new"
#define GTK_STOCK_NO "gtk-no"
#define GTK_STOCK_OK "gtk-ok"